package org.example.DecoratorPattern;

/**
 * 装饰器模式演示
 */
public class DecoratorPatternDemo {
   public static void main(String[] args) {
 
      Shape circle = new Circle();
      ShapeDecorator redCircle = new RedShapeDecorator(new Circle());
      ShapeDecorator redRectangle = new RedShapeDecorator(new Rectangle());
      //Shape redCircle = new RedShapeDecorator(new Circle());
      //Shape redRectangle = new RedShapeDecorator(new Rectangle());
      System.out.println("正常边界圆");
      circle.draw();
 
      System.out.println("\n红边圈");
      redCircle.draw();
 
      System.out.println("\n红色边框矩形");
      redRectangle.draw();
   }
}